<%@page import="org.apache.commons.validator.GenericValidator"%>
<%@page import="org.prs.model.User"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%
            String loginMessage = (String) session.getAttribute("loginmsg");
            session.setAttribute("loginmsg", null);
            User loggedInUser = (User) session.getAttribute("loggedinuser");
            if (loggedInUser != null) {
                response.sendRedirect("welcome.jsp");
            }

%>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta name="keywords" content="" />
        <meta name="description" content="" />
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>Patnership Record System</title>
        <link href="style.css" rel="stylesheet" type="text/css" media="screen" />
    </head>
    <body>
        <div id="wrapper">
            <div id="header">
                <div id="logo">
                    <h1><a href="#">Patnership Record System </a></h1>
                </div>
                <div id="menu">
                   
                </div>
            </div>
            <!-- end #header -->
            <div id="page">
                <div id="page-bgtop">
                    <div id="page-bgbtm">
                        <div id="content">
                            <form class="foorm" name="loginForm" id="loginForm" method="post" action="loginlogout">
                                <%
                                            if (!GenericValidator.isBlankOrNull(loginMessage)) {
                                                out.println(loginMessage);

                                            }
                                %>
                                <table border="0" cellpadding="0" style="width: 100%;">

                                    <tr>
                                        <td width=50%><label>Username</label></td>
                                        <td><input type="text" size="30" name="username" value="" id="username"/></td></tr>
                                    <tr>
                                        <td><label>Password</label></td>
                                        <td><input type="password" size="30" name="password" id="password" value=""/></td></tr>
                                    <tr>
                                        <td colspan="2" style="text-align: center;">
                                            <input type="submit" name="loginsubmit" id="loginsubmit" value="Login" /></td></tr>
                                </table>
                                <input type="hidden" name="action" id="action" value="login" />
                            </form>
                        </div>
                        <!-- end #content -->
                        <div id="sidebar">
                            <div class="navigation">
                                <div class="navhead">Welcome</div>
                                Information about patnership registration system
                            </div>

                        </div>
                        <!-- end #sidebar -->
                        <div style="clear: both;">&nbsp;</div>
                    </div>
                </div>
            </div>
            <!-- end #page -->
        </div>
        <div id="footer">
            <p>Copyright (c) 2011 prs.org. All rights reserved. Design by <a href="http://rwebs.javassl.com/">Java Servlet Systems Limited</a>.</p>
        </div>
        <!-- end #footer -->
    </body>
</html>
